let state = {
  projects: [],
  currentProject: null
};

let mutations = {
  // 设置当前用户的项目列表
  setProjects(state, data) {
    state.projects = data;
  },
  setCurrentProject(state, data) {
    state.currentProject = data;

    this.commit("setCurrentTab", "");
    this.commit("setTabs", []);
  },
  initProject(state, data) {
    state.currentProject = data;
  }
};

export default {
  state,
  mutations
};
